/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.home.tax;

import javax.swing.table.AbstractTableModel;
import org.home.tax.services.TaxServices;

/**
 *
 * @author TIN Nguyen
 */
public class HoSoTableModel extends AbstractTableModel{

    //services
    private static TaxServices taxServices = new TaxServices();
    
    private String[] columnNames = {"STT", "MST", "Doanh Nghiệp", "Địa Chỉ", "Cán Bộ Giữ Ngân Sách", "Trưởng Đoàn", "Trình Trạng", "Ngày", "Cảnh báo", "Hoàn Thành"};
    private Object[][] data = taxServices.constructHoSoTableModel(getColumnCount());

    public int getRowCount() {
        return data.length;
    }

    public int getColumnCount() {
        return columnNames.length;
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        return data[rowIndex][columnIndex];
    }

    @Override
    public String getColumnName(int column) {
        return columnNames[column];
    }
    
}
